TARGET = AdministrationProcess
SOURCES = process_handler.cpp task_scheduler.cpp main.cpp
OBJECTS = $(SOURCES:.cpp=.o)
LIBRARIES = Singleton.a TaskScheduler.a ProcessHandler.a 
EXTERNALINCLUDES = $(EXTERNALDIR)/includes
GLOBALINCLUDES = $(PROJECTDIR)/includes

all : $(OBJECTS)
	$(CXX) -o $(BINARYDIR)/$(TARGET) \
	$(OBJECTDIR)/main.o \
	$(OBJECTDIR)/process_handler.o \
	$(OBJECTDIR)/task_scheduler.o \
	-I $(GLOBALINCLUDES) \
	-I $(EXTERNALINCLUDES) \
	-I $(PROJECTDIR)/$(TARGET)/includes \
	-L $(EXTERNALDIR) \
	-l Singleton \
	-l ProcessHandler \
	-l TaskScheduler \
	-static

main.o :
	@$(CXX) -o $(OBJECTDIR)/$@ \
	-I $(GLOBALINCLUDES) \
	-I $(EXTERNALINCLUDES) \
	-I $(PROJECTDIR)/$(TARGET)/includes \
	-L $(EXTERNALDIR) \
	-l Singleton \
	-l ProcessHandler \
	-l TaskScheduler \
	-c $(PROJECTDIR)/$(TARGET)/sources/$<
	
process_handler.o :
	@$(CXX) -o $(OBJECTDIR)/$@ \
	-I $(GLOBALINCLUDES) \
	-I $(EXTERNALINCLUDES) \
	-I $(PROJECTDIR)/$(TARGET)/includes \
	-L $(EXTERNALDIR) \
	-l ProcessHandler \
	-I $(GLOBALINCLUDES) \
	-c $(PROJECTDIR)/$(TARGET)/sources/$<
	
task_scheduler.o :
	@$(CXX) -o $(OBJECTDIR)/$@ \
	-I $(GLOBALINCLUDES) \
	-I $(EXTERNALINCLUDES) \
	-I $(PROJECTDIR)/$(TARGET)/includes \
	-L $(EXTERNALDIR) \
	-l TaskScheduler \
	-c $(PROJECTDIR)/$(TARGET)/sources/$<